package com.example.wxchatdemo;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class socketAdapter extends BaseAdapter {
    public socketAdapter() {
    }

    public socketAdapter(Context mContext, String text) {
        this.mContext = mContext;
        this.text = text;
    }

    private Context mContext;
    private String text;
    @Override
    public int getCount() {
        return 1;
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        convertView = LayoutInflater.from(mContext).inflate(R.layout.layout_textciew,parent,false);
        TextView lefts = (TextView) convertView.findViewById(R.id.textviews);
        lefts.setText(text);
        return convertView;
    }
}
